home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr50 / vbprint.zip / VBPRINT.TXT < prev   
Text File  |  1993-05-07  |  6KB  |  200 lines

  1. *****************************************************************
  2. *                                *
  3. *    Function Definitions for VBPRINT.DLL            *
  4. *                                *
  5. *****************************************************************
  6.  
  7. -----------------------------------------------------------------
  8.     InitializePrinter(ByVal hWnd%) As Integer
  9.  
  10.     Called at the beginning of a print job where hWnd equals 
  11.     the window handle of the calling applications topmost window.
  12.  
  13. -----------------------------------------------------------------    
  14.     PageLayoutSetup(ByVal nTop%, 
  15.             ByVal nRight%, 
  16.             ByVal nBottom%,
  17.             ByVal nLeft%) As Integer
  18.  
  19.     Called to set the Margins for all subsequent pages.
  20.     Called after InitializePrinter.    
  21.  
  22. -----------------------------------------------------------------    
  23.  
  24.     DonePrinting() As Integer
  25.  
  26.     Called at the end of the print job to do general
  27.     clean up and release the printer.
  28.  
  29. -----------------------------------------------------------------
  30.  
  31.     StartParagraph(    ByVal szFontName$, 
  32.             ByVal nFontSize%, 
  33.             ByVal nStyle%) As Integer
  34.  
  35.     Called before starting to send paragraph text, szFontName
  36.     is the name of the font to be used, nFontSize is the size
  37.     of the font in Points, and nStyle is print attributes to 
  38.     be used, they are defined as follows:
  39.  
  40.     #define BOLD_FONT    0x0001
  41.     #define ITALIC_FONT    0x0002
  42.     #define TOP_BORDER    0x0004
  43.     #define LEFT_BORDER    0x0008
  44.     #define RIGHT_BORDER    0x0010
  45.     #define BOTTOM_BORDER    0x0020
  46.     #define CHECK_BOX    0x0100
  47.  
  48. -----------------------------------------------------------------
  49.  
  50.     PrintParagraphText(ByVal szText$) As Integer
  51.  
  52.     Used to send text into a paragraph, this may be called
  53.     multiple times to add more and more text into the 
  54.     paragraph.  szText is the text to be printed.
  55.  
  56. -----------------------------------------------------------------
  57.  
  58.     FinishParagraph() As Integer
  59.  
  60.     Called at the end of printing a paragraph to do general
  61.     cleanup.
  62.  
  63. -----------------------------------------------------------------
  64.  
  65.     HeadlinePrint(    ByVal szHeadLine$, 
  66.             ByVal szFontName$, 
  67.             ByVal nFontSize%, 
  68.             ByVal nStyle%) As Integer
  69.  
  70.     This is    a one stop shopping approach to printing text, the 
  71.     text in szHeadLine is printed using the font szFontName,
  72.     in size nFontSize defined in points, with the style of
  73.     nStyle.  See style definitions above.
  74.  
  75. -----------------------------------------------------------------
  76.  
  77.     SetParagraphSpacing(ByVal nSpacing%) As Integer
  78.  
  79.     Used to set the spacing between paragraphs, nSpacing is
  80.     defined in points.  The default is 18pts (1/4").
  81.  
  82. -----------------------------------------------------------------
  83.  
  84.     EjectPage() As Integer
  85.  
  86.     Unconditionally ejects the page from the printer.  All
  87.     text already on the page is printed.  The cursor
  88.     position is placed on the upper left hand corner of the
  89.     new page.
  90.  
  91. -----------------------------------------------------------------
  92.  
  93.     PrintDLLVersion() As Integer
  94.  
  95.     Returns the version of the VBPRINT.DLL, the major version
  96.     number is in the low byte of the integer and the minor
  97.     version number is in the high byte of the integer.
  98.  
  99. -----------------------------------------------------------------
  100.  
  101.     SetUpColumns(    ByVal Columns%, 
  102.             ByVal nC1%, 
  103.             ByVal szFontName$, 
  104.             ByVal nFontSize%, 
  105.             ByVal nStyle%) As Integer
  106.  
  107.     This sets up how columns will be printed, Columns is
  108.     the number of columns to be printed, nC1 is an array
  109.     of column widths in one hundredths of an inch 
  110.     (100 = 1") units.  Maximum number of columns is eight.
  111.     szFontName is the name of the font the columns will
  112.     print in, nFontSize is the size of the font in Points
  113.     and nStyle is the style they will be printed in, see
  114.     style definitions above.
  115.  
  116. -----------------------------------------------------------------
  117.  
  118.     PrintColumnText(ByVal szText$) As Integer
  119.  
  120.     Used to send text into the columns.  The text for each
  121.     cell will be delimited by a tab character [chr$(9)].
  122.  
  123.     For example: "C1\tC2\tC3\tC4" would print
  124.  
  125.     C1    C2    C3    c4
  126.  
  127. -----------------------------------------------------------------
  128.  
  129.     EndColumnPrinting() As Integer
  130.  
  131.     Used at the end of printing columns to do general 
  132.     cleanup.
  133.  
  134. -----------------------------------------------------------------
  135.  
  136.     PrintColumnHeaders(    ByVal szHeader$, 
  137.                 ByVal Columns%, 
  138.                 ByVal nC1%,
  139.                 ByVal szFontName$, 
  140.                 ByVal nFontSize%, 
  141.                 ByVal nStyle%) As Integer
  142.  
  143.     This is the one stop shopping approach again, the text in
  144.     szHeader is printed in columns, defined by the number
  145.     of columns (Columns), with the widths in an array nC1 in
  146.     hundreths of an inch (100 = 1"), with the font szFontName,
  147.     with the size nFontSize in Points, and the style of nStyle,
  148.     see above for definition of nStyle.
  149.  
  150. -----------------------------------------------------------------
  151.     MoveYPos( ByVal nY%) As Integer
  152.  
  153.     Moves the current cursor position down in the vertical 
  154.     direction.  The value is in hundredths of an inch.
  155.  
  156. -----------------------------------------------------------------
  157.  
  158.     DrawLine( ByVal nX1%, 
  159.           ByVal nY1%,
  160.           ByVal nX2%,
  161.           ByVal nY2%) As Integer
  162.  
  163.     Draws a line from position (nX1, nY1) to (nX2, nY2).
  164.     The coordinate system is in TWIPS.
  165.  
  166. -----------------------------------------------------------------
  167.     DrawRectangle(     ByVal nX1%,
  168.             ByVal nY1%,
  169.             ByVal nX2%,
  170.             ByVal nY2%) As Integer
  171.  
  172.     Draws a Rectangle with the upper left hand corner at
  173.     (nX1, nY2) and the lower right hand corner at
  174.     (nX2, nY2).  The coordinate system is in TWIPS.
  175.  
  176. -----------------------------------------------------------------
  177.     DrawRndRectangle( ByVal nX1%, 
  178.               ByVal nY1%,
  179.               ByVal nX2%,
  180.               ByVal nY2%,
  181.               ByVal nX3%,
  182.               ByVal nY3%) As Integer
  183.  
  184.     Draws a Rectangle with rounded corners, the upper left
  185.     hand corner is at (nX1, nY1) and the lower left hand
  186.     corner is at (nX2, nY2).  The rounded corners have an
  187.     elliptical shape determined by the height and width in
  188.     (nX3, nY3).  The coordinate system is in TWIPS.
  189.  
  190. -----------------------------------------------------------------
  191.     DrawEllipse(    ByVal nX1%,
  192.             ByVal nY1%,
  193.             ByVal nX2%,
  194.             ByVal nY2%) As Integer
  195.  
  196.     Draws an ellipse that fits within the bounding rectangle
  197.     defined by the upper left hand corner (nX1, nY1) and the
  198.     lower right hand corner (nX2, nY2).  The coordinate 
  199.     system is in TWIPS.    
  200.